#include "motor_AT8236.h"

void motoA(int32_t velocity)
{
    if (velocity > 0) {
        PWMA_IN1 = velocity;
        PWMA_IN2 = 0;       
    } else if (velocity < 0) {
        PWMA_IN1 = 0;
        PWMA_IN2 = -velocity;
    }
}

void motoB(int32_t velocity)
{
    if (velocity > 0) {
        PWMB_IN1 = 0;
        PWMB_IN2 = velocity;
    } else if (velocity < 0) {
        PWMB_IN1 = -velocity;
        PWMB_IN2 = 0;
    }
}